package org.dromara.dp.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;
import java.util.List;

/**
 * 告警点位信息
 *
 * @author Lion Li
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class RiskAlarmVo {

    public RiskAlarmVo(Long alarmId, String indicatorCode, Integer alarmLevel, String alarmValue, Integer warnLevel, LocalDateTime startTime, Long duration, String description, String combineAlarm, String reason) {
        this.alarmId = alarmId;
        this.indicatorCode = indicatorCode;
        this.alarmLevel = alarmLevel;
        this.alarmValue = alarmValue;
        this.warnLevel = warnLevel;
        this.startTime = startTime;
        this.duration = duration;
        this.description = description;
        this.combineAlarm = combineAlarm;
        this.reason = reason;
    }

    /**
     * 告警id
     */
    private Long alarmId;

    /**
     * 位号
     */
    private String indicatorCode;

    /**
     * 告警等级  1低 2正常 3高 4联锁
     */
    private Integer alarmLevel;

    /**
     * 告警值
     */
    private String alarmValue;

    /**
     * 预警等级 1红 2黄 3紫
     */
    private Integer warnLevel;

    /**
     * 报警开始时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime startTime;

    /**
     * 持续时间 单位秒
     */
    private Long duration;

    /**
     * 描述
     */
    private String description;

    /**
     * 组合告警
     */
    private String combineAlarm;

    /**
     * 原因
     */
    private String reason;

    /**
     * 内容
     */
    private String content;

    /**
     * 索引 xy和值 x:y:v
     */
    private List<String> initData;

    /**
     * 残余 x:y
     */
    private String canyuData;
}
